package com.sam.e_annotation;

import com.sam.service.IUserService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import javax.annotation.Resource;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("classpath:com/sam/e_annotation/applicationContext.xml")
public class Demo {

    @Resource(name = "userServiceTarget")
    IUserService userService;

    @Test
    public void fun1(){
        userService.save();
    }

}
